import requests

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.62"
}
urls = [
    'https://downsc.chinaz.net/Files/DownLoad/jianli/202201/jianli16915.rar',
    'https://downsc.chinaz.net/Files/DownLoad/jianli/202201/jianli16916.rar',
    'https://downsc.chinaz.net/Files/DownLoad/jianli/202201/jianli16915.rar'
]


def get_content(url):
    print('正在爬取：', url)
    # get方法是一个阻塞的方法
    response = requests.get(url=url, headers=headers)
    if response.status_code == 200:
        return response.content


def parse_content(content):
    print('响应数据的长度为：', len(content))


for url in urls:
    content = get_content(url)
    parse_content(content)
